package zhtest;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class TestTime {
    public static void main(String[] args) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Calendar calendar = Calendar.getInstance();
        long timeInMillis = calendar.getTimeInMillis();
        String time1 = sdf.format(new Date(1606097361048l));
        String time2= sdf.format(new Date(timeInMillis));
        System.out.println(time1);
        System.out.println(time2);
    }
}
